<template>
  <div class="text">
    <component :key="key" :is="setupOption.showType" />
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'

// Props
const props = defineProps<{
  widgetOptions: any
  isPreview?: Boolean
}>()

const emit = defineEmits([])

const setupOption = computed(() => {
  return props.widgetOptions.setup
})

const key = computed(() => {
  return props.widgetOptions.position.width + props.widgetOptions.position.height + Math.random()
})
</script>

<style scoped lang="scss">
.text {
  width: 100% !important;
  height: 100% !important;
}
</style>
